<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@page import="com.sun.xml.internal.bind.v2.schemagen.xmlschema.Import"%>
<%@ taglib uri="/struts-tags" prefix="s" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
	 <link rel="stylesheet" type="text/css" href="<%=basePath%>js/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>js/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>css/demo.css">
	<script type="text/javascript" src="<%=basePath%>js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/jquery.easyui.min.1.2.2.js"></script>
	<script>
		
		function productFormatter(value){
			for(var i=0; i<products.length; i++){
				if (products[i].productid == value) return products[i].name;
			}
			return value;
		}
		$(function(){
			var lastIndex;
			$('#tt').datagrid({
				
				onBeforeLoad:function(){
					$(this).datagrid('rejectChanges');
				},
				onClickRow:function(rowIndex){
					if (lastIndex != rowIndex){
						$('#tt').datagrid('endEdit', lastIndex);
						$('#tt').datagrid('beginEdit', rowIndex);
					}
					lastIndex = rowIndex;
				}
			});
		});
		
			
	</script>
</head>
<body>
	<form action="<%=basePath%>add.action" method="post" class='' >
	<table id="tt" style="width:1000;height:auto"
			title="添加客户 " iconCls="icon-edit" singleSelect="true"
			>
		<thead>
			<tr>
				<th  width="80"  align="center" formatter="productFormatter">客户姓名</th>
				<th  width="120" align="center">手机号码</th>
				<th  width="50" align="center">性别</th>
				<th  width="100" align="center">出生日期</th>
				<th  width="60" align="center">客户分组</th>
				<th  align="center"></th>
			</tr>
			
			 <tr>
			 	<th><input  name="user.userName" type="text"/></th>
				<th><input  name="user.phone" type="text"/></th>
				<th><select name="user.sex" style="width:150px;"><option value="1">男</option><option value="0">女</option></select>
			    <th><input  name="user.birthday" type="text"></th>
				<th><select name="user.teamId" style="width:150px;">
								<option value="1">VIP客户</option>
								<option value="2">普通客户</option>
					</select></th>
				<th><input  type="submit" value="完成"/></th>
			 </tr>
		</thead>
	</table>
	</form>
</body>
</html>